package com.tz.entity;

import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2017/1/6.
 */
@Component
public class Hdd extends HardDisk {

    private int speed; //转速

    public Hdd(int capacity, String vendor, int speed) {
        super(capacity, vendor);
        this.speed = speed;
    }

    public Hdd() { }

    public Hdd(int speed) {
        this.speed = speed;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Hdd{");
        sb.append(super.toString()).append(" speed=").append(speed);
        sb.append('}');
        return sb.toString();
    }
}
